package com.cyou.qb.front.jmx;

import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import com.cyou.nad.utils.jmx.FrameWorkLogHelper;
import com.cyou.nad.utils.jmx.FrameWorkLogHelperMBean;
import com.cyou.nad.utils.jmx.JmxAgent;
import com.cyou.nad.utils.jmx.MyCacheUtils;
import com.cyou.qb.constants.Constants;
import com.cyou.qb.face.constants.FaceConstants;

@Component
public class QbFrontJmx extends JmxAgent{
	public QbFrontJmx() {
		super();
		System.out.println("QbFrontJmx  启动...");
	}
	
	@Override
	public Integer getJmxHtmlAdapterPort() {
		return 8084;
	}

	@Override
	public String getJmxHtmlAdapterName() {
		return "cyou173qb_jmx_console";
	}

	@Override
	public Map<String, Object> getMBean() {
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("cyou173qb_frameWorkLog", new FrameWorkLogHelper());
		map.put("cyou173qb_constants", new Constants());
		map.put("cyou173qb_debug", new DebugContext());
		map.put("cyou173qb_memcached", new MyCacheUtils());
		map.put("cyou173qb_frontconstants", new FrontConstants());
		map.put("cyou173qb_faceConstants", new FaceConstants());
		return map;
	}
	

	@Override
	public String getUserName() {
		return "cyou173qb";
	}

	@Override
	public String getPassword() {
		return "cyou173qb";
	}   


}
